<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {	
		$("#pwd").keydown(function(e) {
			if(e.keyCode == 13)	login();
		});
		
		$("#auto_login").click(function() {
			if($("input:checkbox[name='auto_login']").is(":checked")) {
				$("#save_id").attr("checked", true);
			} else {
				$("#save_id").attr("checked", false);
			}
		});
	});
	
	function login() {
		var id=$("#id").val();
		var pwd=$("#pwd").val();
		id=$.trim(id);
		pwd=$.trim(pwd);
		if(id=="") {
			alert("아이디를 넣어주세요");
			return; 
		}
		if(pwd=="") {
			alert("패스워드를 넣어주세요");
			return;	
		}
		$("#frm").submit();
	}
</script>

<!-- 콘텐츠 영역 -->
    <div id="BodyWrap">
        <section>
            <h4 class="pag_title">로그인</h4>
            <!-- 로그인 입력 단계 -->
            <form id="frm" method="post" action="${contextPath }/vhmall/member/logincheck.vh">
			<div id="loginWrap">
            	<div class="log_boxarea">
					<div>
                    	<p><input type="text" id="id" name="id" placeholder="아이디" value="${member_id}"></p>
                    	<a href="javascript:delText(id);" class="btn_delsi1" title="삭제">×</a>
                    </div>
                    <div>
                    	<p><input type="password" id="pwd" name="pwd" placeholder="비밀번호"></p>
                    	<a href="javascript:delText(pwd);" class="btn_delsi1" title="삭제">×</a>
                    </div>
				</div>
                <!-- 로그인 저장 자동 로그인 부분 -->
                <div class="log_check">
                    <span class="inp_ckb">
                        <input id="auto_login" class="ckb" type="checkbox" value="on" name="auto_login" <c:out value="${auto_login eq 'Y'?'checked':''}"/>/>
                        <label for="auto_login">자동 로그인</label>
                    </span>
                    <span class="inp_ckb">
                        <input id="save_id" class="ckb" type="checkbox" value="on" name="save_id" <c:out value="${member_id!=null?'checked':''}"/> />
                        <label for="save_id">아이디 저장</label>
                    </span>
                </div>
                <!--// 로그인 저장 자동 로그인 부분 -->
                <!--div class="btnposition_itembuy">
                    <div class="btnwline3">
                        <a href="#" class="home" title="홈으로 가기">홈으로 가기</a>
                        <a href="#" class="membjoin" title="회원가입">회원가입</a>
                        <a href="#" title="확인">확인</a>
                    </div>
                </div-->
                <div class="btnposition_itembuy">
                    <div class="btnwline1_red">
                        <a href="javascript:login();" class="gradation_red2" title="확인">확인</a>
                    </div>
                </div>
                <div class="ta_c">
                    <a href="#" class="btn_inlistyle1 gradation_darkgray1 fts_s1 ftc_white" title="비회원 구매">비회원 구매</a>
                    <a href="/vhmall/member/join1_1.vh" class="btn_inlistyle1 gradation_gray1 fts_s1" title="회원가입">회원가입</a>
                    <a href="/vhmall/member/idFind1_1.vh" class="btn_inlistyle1 gradation_gray1 fts_s1" title="아이디찾기">아이디찾기</a>
                    <a href="/vhmall/member/pwFind1_1.vh" class="btn_inlistyle1 gradation_gray1 fts_s1" title="비번찾기">비번찾기</a>
                </div>
            </div>
           	</form>
            <!--// 로그인 입력 단계 -->
            <!-- 휴대폰 인증 번호 단계 
            <div class="mblk_title">
            	휴대폰 문자메시지로 발송된 인증번호를 입력해주세요.
            </div>
			<div id="loginWrap">
            	<div class="log_boxarea">
					<div>
                    	<p><input type="text" name="textfield3" id="textfield3" placeholder="인증 번호를 입력해 주세요."></p>
                    	<a href="#" class="btn_delsi1" title="삭제">×</a>
                    </div>
				</div>
                <div class="btnposition_itembuy">
                    <div class="btnwline2 btnborline_white">
                        <a href="#" class="gradation_white2" title="회원 가입">회원 가입</a>
                    </div>
                    <div class="btnwline2 btnborline_red">
                        <a href="#" class="gradation_red2" title="인증번호 입력">인증번호 입력</a>
                    </div>
                </div>
            </div>
            <!--// 휴대폰 인증 번호 단계 -->
        </section>
        <!--// 콘텐츠 영역 -->